<template>
  <div id="app">
  
    <v-left  @myindex='thindex'></v-left>
    <v-right :index="index"></v-right>
  </div>
</template>

<script>
// import HelloWorld from './components/HelloWorld.vue'
import vLeft from './components/left.vue'
import vRight from './components/right.vue'

export default {
  name: 'App',
  data() {
    return {
      index:0
    }
  },
  components: {
    vLeft,
    vRight
  },
  methods: {
    thindex(index) {
     
      this.index=index
      console.log( this.index);
    }
  },
}
</script>

<style>
*{
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
#app {
  display: flex;
  flex-direction: row;
}
</style>
